<template>
  <div class="goods">
    <h3>{{ pname }}</h3>
    <p>{{ price }}</p>
    <p>{{ info }}</p>
    <button @click="$emit('kanyidao',id)">砍一刀</button>
  </div>
</template>

<script>
export default {
  props: ["id", "pname", "price", "info"],
};
</script>

<style>
.goods {
  padding: 5px;
  margin: 10px;
  border: solid 2px black;
}
</style>